package com.mock.action.services;

import java.util.ArrayList;
import java.util.List;

import com.mock.action.AbstractAction;
import com.mock.dao.impl.ServiceTypeDaoImpl;
import com.mock.model.Service;
import com.mock.model.ServiceType;

public class AddServiceAction extends AbstractAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5408570358985284705L;
	
	private Service service;
	private List<String> listSubType;
	private List<ServiceType> listServiceType;
	private List<String> listAttendance;
	
	public String execute() {
		generateData();
		return SUCCESS;
	}
	
	private void generateData() {
		listSubType = new ArrayList<String>();
		listSubType.add("Contract");
		listSubType.add("Funding");
		listServiceType = new ArrayList<ServiceType>();
		listServiceType = new ServiceTypeDaoImpl().getAll(ServiceType.class);
		listAttendance = new ArrayList<String>();
		listAttendance.add("Masami");
		listAttendance.add("Aragaki");
	}

	public Service getService() {
		return service;
	}

	public void setService(Service service) {
		this.service = service;
	}

	public List<String> getListSubType() {
		return listSubType;
	}

	public void setListSubType(List<String> listSubType) {
		this.listSubType = listSubType;
	}

	public List<ServiceType> getListServiceType() {
		return listServiceType;
	}

	public void setListServiceType(List<ServiceType> listServiceType) {
		this.listServiceType = listServiceType;
	}

	public List<String> getListAttendance() {
		return listAttendance;
	}

	public void setListAttendance(List<String> listAttendance) {
		this.listAttendance = listAttendance;
	}

}
